<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    function P() {
      // this.name = 123
    }
    let n = {
      name: 1111,
      sum: function () {
        console.log(this.name);
      }
    }
    
    let a = new P()
    Object.setPrototypeOf(a,n)
    console.log(Object.getPrototypeOf(a) === a.__proto__);
    
  </script>
</body>
</html>